Skip to content

feat: support compile torchair graph while warming up #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

NeverRaR
Copy link
Contributor

What this PR does / why we need it?

feat: support compile torchair graph while warming up

Does this PR introduce any user-facing change?

How was this patch tested?

@NeverRaR NeverRaR force-pushed the dev/graph branch 9 times, most recently from a49f965 to 99be815 Compare May 14, 2025 08:29
@NeverRaR NeverRaR force-pushed the dev/graph branch 8 times, most recently from 71634df to 44b77b9 Compare May 29, 2025 06:17
@NeverRaR NeverRaR force-pushed the dev/graph branch 2 times, most recently from 5caa186 to 42544de Compare May 29, 2025 09:34
torch._logging.set_logs(recompiles=True)
self.torchair_graph_batch_sizes = additional_config.get(
"torchair_graph_batch_sizes", [])
if not isinstance(self.torchair_graph_batch_sizes, list):
Copy link
Collaborator

@wangxiyuan wangxiyuan May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have enable_graph_mode to controller torchair, here named torchair_graph_batch_sizes, w'd better to use the same prefix. How about use torchair_graph for all case? cc @zzzzwwjj

#947 (comment)

@wangxiyuan
Copy link
Collaborator

I added a new ascendconfig to deal with all additional_config #1029 . The comment I added before can be addressed later. Please fix the merge conflict, then the PR is ready to go IMO.

@NeverRaR NeverRaR force-pushed the dev/graph branch 3 times, most recently from bafde8a to 09b0d9d Compare May 30, 2025 08:21
@wangxiyuan
Copy link
Collaborator

test_scheduler.py should be updated as well. for example lora_config has been removed

@wangxiyuan wangxiyuan added the ready read for review label May 30, 2025
@NeverRaR NeverRaR force-pushed the dev/graph branch 7 times, most recently from 41e28c9 to 54f3a05 Compare May 30, 2025 16:26
@Yikun
Copy link
Collaborator

Yikun commented May 30, 2025

export DEVICE=/dev/davinci0
export IMAGE=m.daocloud.io/quay.io/ascend/vllm-ascend:main
docker run --rm \
--name xxx-test \
--device $DEVICE \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v /root/.cache:/root/.cache \
-it $IMAGE bash

# Fetch the latest main
cd /vllm-workspace/vllm-ascend
git pull --rebase

# add upstream
git remote add upstream https://github.com/vllm-project/vllm-ascend.git

# add git alias
cat ~/.gitconfig
[alias]
	pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^upstream || echo origin)} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"

# checkout 839 pr
git pr 839

# Run test
export VLLM_USE_MODELSCOPE=true
pytest -sv tests/singlecard/test_scheduler.py

I noticed you are trying to fix scheduler UT via frequetly changes, this might the effective way to reproduce and run test locally

@NeverRaR NeverRaR force-pushed the dev/graph branch 4 times, most recently from 5f20f3c to 53679a8 Compare May 30, 2025 17:58
Signed-off-by: boying <897013703@qq.com>
@wangxiyuan wangxiyuan merged commit 507ae62 into vllm-project:main May 30, 2025
23 checks passed
momo609 pushed a commit to momo609/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
Signed-off-by: wangxiaoxin (A) <w00664509@china.huawei.com>
momo609 pushed a commit to momo609/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
Signed-off-by: wangxiaoxin (A) <w00664509@china.huawei.com>
momo609 pushed a commit to momo609/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
Signed-off-by: wangxiaoxin (A) <w00664509@china.huawei.com>
weijinqian0 pushed a commit to weijinqian0/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
momo609 pushed a commit to momo609/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
Signed-off-by: wangxiaoxin (A) <w00664509@china.huawei.com>
David9857 pushed a commit to David9857/vllm-ascend that referenced this pull request Jun 3, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
momo609 pushed a commit to momo609/vllm-ascend that referenced this pull request Jun 4, 2025
### What this PR does / why we need it?
feat: support compile torchair graph while warming up

Signed-off-by: boying <897013703@qq.com>
Signed-off-by: wangxiaoxin (A) <w00664509@china.huawei.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants